import VueRouter from 'vue-router';

// import home from "./components/tabard/home.vue"
// import Member from "./components/tabard/Member.vue"
// import search from "./components/tabard/search.vue"

import Home from './components/tabard/home.vue';
import Member from './components/tabard/Member.vue';
import Shop from './components/tabard/Shop.vue';
import Search from './components/tabard/Search.vue';
import list from "./components/news/list.vue";
import newsInfo from "./components/news/newsInfo.vue";
import photosList from "./components/photos/photosList.vue";
import photosInfo from './components/photos/photoInfo.vue'

// 3. 创建路由对象
var router = new VueRouter({
    routes: [
        { path: '/', redirect: "/home" },
        { path: "/home", component: Home },
        { path: "/member", component: Member },
        { path: "/shop", component: Shop },
        { path: '/search', component: Search },
        { path: '/home/list', component: list },
        { path: '/home/newsInfo/:id', component: newsInfo },
        { path: '/home/photos', component: photosList },
        { path: '/home/photosList/:id', component: photosInfo }
    ],
    linkActiveClass: "mui-active"
})

// 把路由对象暴露出去
export default router